package com.yellowpage.alarm.data;

import static javax.persistence.GenerationType.SEQUENCE;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * 告警信息处理人关联表POJO
 * 
 * @author 黄敏华
 * 
 */
@Entity
@Table(name = "CA_ALARMINFO_USER")
public class AlarmInfoUser implements java.io.Serializable {
	// Sequence生成的主键
	private Long id;
	private String alarmType;
	private Long userId;

	public AlarmInfoUser() {
	}

	public AlarmInfoUser(String alarmType, Long userId) {
		this.alarmType = alarmType;
		this.userId = userId;
	}

	@GenericGenerator(name = "generator", strategy = "identity")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "ID", unique = true, nullable = false, precision = 18, scale = 0)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "ALARM_TYPE", length = 4)
	public String getAlarmType() {
		return alarmType;
	}

	public void setAlarmType(String alarmType) {
		this.alarmType = alarmType;
	}

	@Column(name = "USER_ID", precision = 18, scale = 0)
	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

}
